s = input().split(" ")
n1 = int(s[0])
m1 = int(s[1])
A = [None] * n1
for i in range(n1):
    A[i] = [float(x) for x in input().split(" ")]
s = input().split(" ")
n2 = int(s[0])
m2 = int(s[1])
B = [None] * n2
for i in range(n2):
    B[i] = [float(x) for x in input().split(" ")]
C = [None] * n1
for i in range(n1):
    C[i] = [None] * m2
for i in range(n1):
    for j in range(m2):
        num = 0
        for k in range(n2):
            num += A[i][k] * B[k][j]
        C[i][j] = num;
        print("%.1f" % C[i][j], end=" ")
    print()
